<template>
  <div id="app">
    <!-- 开关组件 -->
    <el-switch
    v-for="(item) in thisData"
    :key='item.id'
    v-model='item.cont'
    :active-value="true"
    :inactive-value="false"
    @change="handleChange"
    >

    </el-switch>
  </div>

</template>

<script>
export default {

  data() {
    return {
      thisData:[
        {
          id:1,
          cont:'内容1',
          value:true
        },
        {
          id:2,
          cont:'内容2',
          value:true
        },
        {
          id:3,
          cont:'内容3',
          value:true
        },

      ]
    }
  },
  name: "App",
  methods: {
    handleChange:function(value){
      console.log(value)
    }
  },
  components: {},
};
</script>
<style>
* {
  margin: 0;
  padding: 0;
}
</style>

<style lang="less" scoped>
</style>
